package com.hdoit.kylin.logical.relative.dao.impl;

import org.springframework.stereotype.Component;

import com.tennetcn.common.dao.base.IFinderExpression;
import com.tennetcn.common.dao.base.impl.SuperDao;
import com.tennetcn.common.utils.FinderExpressionFactory;
import com.hdoit.kylin.logical.relative.dao.IProposalDocumentDao;
import com.hdoit.kylin.logical.relative.model.ProposalDocument;
/**
 * @author      tanzulie
 * @email       
 * @createtime  2017年08月01日 16:06:52
 * @comment
 */
@Component
public class ProposalDocumentDaoImpl extends SuperDao<ProposalDocument> implements IProposalDocumentDao{

	@Override
	public boolean deleteProposalDocumentByProposalId(String proposalId) {
		IFinderExpression finder=FinderExpressionFactory.createExpression();
		finder.delete()
			  .from(ProposalDocument.class)
			  .andWhere("proposalId=#{proposalId}")
			  .setParam("proposalId", proposalId);
		return delete(finder)>=0;
	}

}